//
//  CoinNumberModel.swift
//  Exchange
//
//  Created by 孟祥群 on 2018/6/25.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit
import ObjectMapper
class CoinNumberModel: BaseModel, Mappable {
    var coinCode:String = ""
    var addressNumber:Int = 0
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        coinCode <- map["coinCode"]
        addressNumber <- map["addressNumber"]
        
    }
    
    
}

class CoinCodeModel: BaseModel, Mappable {
    var coinCode:String = ""
    var drawAdd:String = ""
    var remarks:String = ""
    var userId:Int = 0
    var height:CGFloat = 0.00
    required init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        coinCode <- map["coinCode"]
        userId <- map["userId"]
        drawAdd <- map["drawAdd"]
        remarks <- map["remarks"]
        self.archiveHeight()
    }
    
    func archiveHeight() {
        height = drawAdd.cy_heightForComment(fontSize: 15.00, width: kSCREEN_WIDTH-80)
        height = height > 20 ? height : 20
    }
    
    
}
